Skip to content

In this changes added support Windows Server 2012 - #56

Open
AlexMod123 wants to merge 1 commit into
hashtopolis:masterfrom
AlexMod123:server
Open

In this changes added support Windows Server 2012#56
AlexMod123 wants to merge 1 commit into
hashtopolis:masterfrom
AlexMod123:server

Conversation

@AlexMod123

Copy link
Copy Markdown

During the time of working with your wonderful development I encountered the problem that your agent does not start on a PC with Windows Server 2012 and Windows Server 2012 r2 OS

@s3inlc s3inlc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR, I looked through the code and requested some changes regarding the code. Unfortunately I myself don't have a Windows Server setup to test on (neither a normal Windows setup to test if nothing existing breaks), so I may need a bit of time to have other people test it on their setup.

Comment thread htpclient/initialize.py
def __init__(self):
self.config = Config()
# In windows server and windows server R2 uses cp1251 encoding
self.encoding = "utf-8"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does this need to be set as variable here when the only place where it is used is where 'utf-8' was already enforced there? Or how is this supposed to be changed on the class?

Comment thread htpclient/initialize.py
processor_information = subprocess.check_output(
'powershell -Command "Get-CimInstance Win32_Processor | Select-Object -ExpandProperty Name"',
shell=True)
'powershell -Command "Get-CimInstance Win32_Processor | Select-Object -ExpandProperty Name"',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this indentation is inconsistent with the other parts where the subprocess commands are called (indented twice instead of just once)

Comment thread htpclient/initialize.py
shell=True)
processor_information = self.decode_output(processor_information)
video_controller = subprocess.check_output('wmic path win32_VideoController get name', shell=True)
'powershell -Command "Get-CimInstance Win32_VideoController | Select-Object -ExpandProperty Name"',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this indentation is inconsistent with the other parts where the subprocess commands are called (indented twice instead of just once)

Comment thread htpclient/initialize.py
line = line.rstrip("\r\n ")
if line and line != "Name":
devices.append(line)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this empty line helps for code readability, i.e. the section between linux and windows also is separated with an empty line, so it should remain also for consistency.

@AlexMod123

AlexMod123 commented Sep 1, 2026 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants